package com.example.apple_starter.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

@SuppressWarnings("AppleServiceProperties")
@ConfigurationProperties("appleserviceproperties")
public class AppleServiceProperties {


    public  void setName(String name) {
        AppleServiceProperties.name = name;
    }

    public  void setRangeForBig(float[] rangeForBig) {
        AppleServiceProperties.rangeForBig = rangeForBig;
    }

    public  void setRangeForPrice(float[] rangeForPrice) {
        AppleServiceProperties.rangeForPrice = rangeForPrice;
    }

    public  void setColor(String color) {
        Color = color;
    }

    public  String getName() {
        return name;
    }

    public  float[] getRangeForBig() {
        return rangeForBig;
    }

    public  float[] getRangeForPrice() {
        return rangeForPrice;
    }

    public  String getColor() {
        return Color;
    }

    /**
     * 苹果名字，比如红富士
     */
    public static String name = "红富士";
    /**
     * 苹果尺寸范围,[40,60]
     */
    public static float[] rangeForBig = new float[]{40, 100};
    /**
     * 价格波动允许范围
     */
    public static float[] rangeForPrice = new float[]{5, 10};
    /**
     * 颜色
     */
    public static String Color = "红色";
}
